package com.jcms.cms.dao.parcel.impl;

import java.util.List;

import org.springframework.stereotype.Repository;

import com.jcms.cms.dao.parcel.CourierCompanyDao;
import com.jcms.cms.entity.parcel.CourierCompany;
import com.jcms.common.hibernate3.HibernateBaseDao;

@Repository
public class CourierCompanyDaoImpl  extends HibernateBaseDao<CourierCompany, Integer> implements CourierCompanyDao {

	@Override
	protected Class<CourierCompany> getEntityClass() {
		return CourierCompany.class;
	}

	@SuppressWarnings("unchecked")
	public List<CourierCompany> getAll() {
		return this.find("from CourierCompany");
	}

	public CourierCompany getCompanyById(String id) {
		return get(Integer.parseInt(id));
	}

}
